package com.example.jn_dxs.Ui.adapter;


import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;

import com.example.jn_dxs.Base.BaseFragment;

public class HomeFragmentPagerAdapter extends FragmentPagerAdapter {

    private BaseFragment[] fragments;

    public HomeFragmentPagerAdapter(FragmentManager fm, BaseFragment... fragments) {
        super(fm);
        this.fragments = fragments;
    }

    @Override
    public Fragment getItem(int i) {
        return fragments[i];
    }

    @Override
    public int getCount() {
        return fragments.length;
    }
}
